]> dgit.raspbian.org Git - gnome-shell.git/commit
extensionSystem: Get rid of _enabled boolean optimization
authorRay Strode <rstrode@redhat.com>
Tue, 10 Aug 2021 17:25:57 +0000 (13:25 -0400)
committerMarge Bot <marge-bot@gnome.org>
Thu, 14 Oct 2021 18:40:53 +0000 (18:40 +0000)
commit7e5ee2c28239036e9b24613e2f476a998cc5daf9
tree86f225089d15d0968468891e75e539d9200c85a2
parent7bde02c1cf6e0456cc8d0dff3922458866cb2e74
extensionSystem: Get rid of _enabled boolean optimization

At the moment a session mode either allows extensions or it doesn't.
If it allows extensions, then the entire available list of
configured extensions get enabled as soon as the session mode is
entered.

Since enabling or disabling extensions is an all or nothing situation,
the code tracks whether extensions are already enabled when entering
the session mode, and if so, avoids iterating through the extension list
needlessly. It does this using a boolean named _enabled.

In the future, the extensions themselves will be given some say on
whether or not they should be enabled in a given session mode. This
means, the configured extension list may contain extensions that
shouldn't be enabled for a given session mode, and the _enabled boolean
will no longer be appropriated.

This commit drops the _enabled boolean optimization.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1967>
js/ui/extensionSystem.js